<%  if @local_medias  %>
   <h1>
      <%= h @title %>
      <%= check_box_tag('local_dl_only', nil, true,:disabled => true) %>
    </h1>
<% for media in @local_medias%>
  <div class="post">
    <h3><%=link_to(h(media.nom), media_path(media)) %></h3>
    <ul class="post_info">
      <li class="date">|<%=link_to(media.category.label,category_medias_path(media.category_id))%>|<%=media.langue%>|
        Posted <%= ('by '+link_to(media.user.nickname,user_medias_url(media.user))) if media.user%> on <%=h media.updated_at.strftime("%Y-%m-%d %H:%M:%S") %></li>
      <li class="comments"><a href="#"><%= media.comments.size %> comment(s)</a></li>
      <% if media.local_path && !media.local_path.empty?%>
      <li><%= link_to_remote('Téléchargement Direct', :url => media_path(media.id), :update => "details_#{media.id}", :method => :get, :complete => visual_effect(:toggle_blind, "details_#{media.id}")
) %></li>
    </ul>
    <div style="display: none" id="details_<%= media.id %>">
      <% if media.img_src %>
        <img src="<%= media.img_src %>" alt="<%= media.nom %>" />
      <% end %>
      <p>Downloads</p>
    </div>
    <% else %>
    </ul>
    <% end%>
  </div>
  <br class="clear" />
<% end%>
<% end %>
   <h1>
      <%= h @title %>
      <%= check_box_tag('local_dl_only', nil, false,:disabled => true) %>
    </h1>


<%= will_paginate @medias %><br/>
<% for media in @medias %>
  <div class="post">
    <h3><%=link_to(h(media.nom), media_path(media)) %></h3>
    <ul class="post_info">
      <li class="date">|<%=link_to(media.category.label,category_medias_path(media.category_id))%>|<%=media.langue%>|
        Posted <%= ('by '+link_to(media.user.nickname,user_medias_url(media.user))) if media.user%> on <%=h media.updated_at.strftime("%Y-%m-%d %H:%M:%S") %></li>
      <li class="comments"><a href="#"><%= media.comments.size %> comment(s)</a></li>
      <% if media.local_path && !media.local_path.empty?%>
      <li><%= link_to_remote('Téléchargement Direct', :url => media_path(media.id), :update => "details_#{media.id}", :method => :get, :complete => visual_effect(:toggle_blind, "details_#{media.id}")
) %></li>
    </ul>
    <div style="display: none" id="details_<%= media.id %>">
      <% if media.img_src %>
        <img src="<%= media.img_src %>" alt="<%= media.nom %>" />
      <% end %>
      <p>Downloads</p>
    </div>
    <% else %>
    </ul>
    <% end %>
  </div>
  <br class="clear" />
<% end %>
<%= will_paginate @medias %>